package com.example.designpatterns.decorator;

public class Test {

    public static void main(String[] args) {
        BaseBattercake baseBattercake = new BaseBattercake();
        // 加一个火腿
        HamBattercake hamBattercake = new HamBattercake(baseBattercake);
        // 加一个鸡蛋
        EggBattercake eggBattercake = new EggBattercake(hamBattercake);

        System.out.println(eggBattercake.getMsg() + "   价格：" + eggBattercake.getPrice());
    }
}
